import request from '@/utils/request.js'

// 列表
export const listPage = (params, data) => request({ url: `/web/crewResume/pageList`, method: 'post', params, data })

//简历详情
export const getCrewResume = (data) => request({ url: `/web/crewResume/${data}`, method: 'get' })
//收藏简历
export const resumeCollect = (data) => request({ url: `/web/crewResume/resumeCollect`, method: 'post', data })
//取消收藏简历
export const cancelFavorite = (data) => request({ url: `/web/crewResume/cancelFavorite`, method: 'post', data })

//收藏简历列表
export const collectionListApi = (params) => request({ url: `/web/crewResume/collectionList`, method: 'get', params })

//下载
export const crewResumeDownloadApi = (id) => request({ url: `/web/crewResume/download/${id}`, method: 'get', responseType: 'blob', loading: true })

//新增简历
export const addCrewResume = (params) => request({ url: `/web/crewResume/add`, method: 'post', data: params })
//获取用户登录信息
export const getUserInfo = (data) => request({ url: `/web/customer/${data}`, method: 'get' })
//招聘列表
export const getRecuitList = (params) => request({ url: `/web/recuit/list`, method: 'get', params })

// 获取招聘详细信息
export const getRecuitDetail = (id) => request({ url: `/web/recuit/${id}`, method: 'get' })

//新增招聘
export const addRecuit = (data) => request({ url: `/web/recuit`, method: 'post', data, loading: true })
//编辑简历
export const editCrewResume = (params) => request({ url: `/web/crewResume`, method: 'put', data: params })
//根据用户ID查询简历
export const getCrewResumeById = (params) => request({ url: `/web/crewResume/getInfoByCustomerId/${params}`, method: 'get' })
// banner图
export const bannerList = (params) => request({ url: `/web/banner/getInfoByBannerModel`, method: 'get', params })
